3.1.52 \(\int \frac {A+B x^2}{b x^2-c x^4} \, dx\) [52]

Optimal. Leaf size=41 \[ -\frac {A}{b x}+\frac {(b B+A c) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {b}}\right )}{b^{3/2} \sqrt {c}} \]

[Out]

-A/b/x+(A*c+B*b)*arctanh(x*c^(1/2)/b^(1/2))/b^(3/2)/c^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {1607, 464, 214} \begin {gather*} \frac {(A c+b B) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {b}}\right )}{b^{3/2} \sqrt {c}}-\frac {A}{b x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/(b*x^2 - c*x^4),x]

[Out]

-(A/(b*x)) + ((b*B + A*c)*ArcTanh[(Sqrt[c]*x)/Sqrt[b]])/(b^(3/2)*Sqrt[c])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 464

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {align*} \int \frac {A+B x^2}{b x^2-c x^4} \, dx &=\int \frac {A+B x^2}{x^2 \left (b-c x^2\right )} \, dx\\ &=-\frac {A}{b x}+\frac {(b B+A c) \int \frac {1}{b-c x^2} \, dx}{b}\\ &=-\frac {A}{b x}+\frac {(b B+A c) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {b}}\right )}{b^{3/2} \sqrt {c}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 41, normalized size = 1.00 \begin {gather*} -\frac {A}{b x}+\frac {(b B+A c) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {b}}\right )}{b^{3/2} \sqrt {c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/(b*x^2 - c*x^4),x]

[Out]

-(A/(b*x)) + ((b*B + A*c)*ArcTanh[(Sqrt[c]*x)/Sqrt[b]])/(b^(3/2)*Sqrt[c])

________________________________________________________________________________________

Maple [A]
time = 0.50, size = 39, normalized size = 0.95

method result size
default \(-\frac {A}{b x}-\frac {\left (-A c -B b \right ) \arctanh \left (\frac {c x}{\sqrt {b c}}\right )}{b \sqrt {b c}}\) \(39\)
risch \(-\frac {A}{b x}+\frac {\ln \left (x \sqrt {b c}+b \right ) A c}{2 \sqrt {b c}\, b}+\frac {\ln \left (x \sqrt {b c}+b \right ) B}{2 \sqrt {b c}}-\frac {\ln \left (x \sqrt {b c}-b \right ) A c}{2 \sqrt {b c}\, b}-\frac {\ln \left (x \sqrt {b c}-b \right ) B}{2 \sqrt {b c}}\) \(95\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/(-c*x^4+b*x^2),x,method=_RETURNVERBOSE)

[Out]

-A/b/x-(-A*c-B*b)/b/(b*c)^(1/2)*arctanh(c*x/(b*c)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 51, normalized size = 1.24 \begin {gather*} -\frac {{\left (B b + A c\right )} \log \left (\frac {c x - \sqrt {b c}}{c x + \sqrt {b c}}\right )}{2 \, \sqrt {b c} b} - \frac {A}{b x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(-c*x^4+b*x^2),x, algorithm="maxima")

[Out]

-1/2*(B*b + A*c)*log((c*x - sqrt(b*c))/(c*x + sqrt(b*c)))/(sqrt(b*c)*b) - A/(b*x)

________________________________________________________________________________________

Fricas [A]
time = 1.62, size = 103, normalized size = 2.51 \begin {gather*} \left [\frac {{\left (B b + A c\right )} \sqrt {b c} x \log \left (\frac {c x^{2} + 2 \, \sqrt {b c} x + b}{c x^{2} - b}\right ) - 2 \, A b c}{2 \, b^{2} c x}, -\frac {{\left (B b + A c\right )} \sqrt {-b c} x \arctan \left (\frac {\sqrt {-b c} x}{b}\right ) + A b c}{b^{2} c x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(-c*x^4+b*x^2),x, algorithm="fricas")

[Out]

[1/2*((B*b + A*c)*sqrt(b*c)*x*log((c*x^2 + 2*sqrt(b*c)*x + b)/(c*x^2 - b)) - 2*A*b*c)/(b^2*c*x), -((B*b + A*c)
*sqrt(-b*c)*x*arctan(sqrt(-b*c)*x/b) + A*b*c)/(b^2*c*x)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (34) = 68\).
time = 0.17, size = 75, normalized size = 1.83 \begin {gather*} - \frac {A}{b x} - \frac {\sqrt {\frac {1}{b^{3} c}} \left (A c + B b\right ) \log {\left (- b^{2} \sqrt {\frac {1}{b^{3} c}} + x \right )}}{2} + \frac {\sqrt {\frac {1}{b^{3} c}} \left (A c + B b\right ) \log {\left (b^{2} \sqrt {\frac {1}{b^{3} c}} + x \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/(-c*x**4+b*x**2),x)

[Out]

-A/(b*x) - sqrt(1/(b**3*c))*(A*c + B*b)*log(-b**2*sqrt(1/(b**3*c)) + x)/2 + sqrt(1/(b**3*c))*(A*c + B*b)*log(b
**2*sqrt(1/(b**3*c)) + x)/2

________________________________________________________________________________________

Giac [A]
time = 0.85, size = 38, normalized size = 0.93 \begin {gather*} -\frac {{\left (B b + A c\right )} \arctan \left (\frac {c x}{\sqrt {-b c}}\right )}{\sqrt {-b c} b} - \frac {A}{b x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(-c*x^4+b*x^2),x, algorithm="giac")

[Out]

-(B*b + A*c)*arctan(c*x/sqrt(-b*c))/(sqrt(-b*c)*b) - A/(b*x)

________________________________________________________________________________________

Mupad [B]
time = 0.15, size = 33, normalized size = 0.80 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\sqrt {c}\,x}{\sqrt {b}}\right )\,\left (A\,c+B\,b\right )}{b^{3/2}\,\sqrt {c}}-\frac {A}{b\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x^2)/(b*x^2 - c*x^4),x)

[Out]

(atanh((c^(1/2)*x)/b^(1/2))*(A*c + B*b))/(b^(3/2)*c^(1/2)) - A/(b*x)

________________________________________________________________________________________